// const Mock = require('mockjs')
// const data = Mock.mock({
//   'items|30': [{
//     id: '@id',
//     // 'genderStatus|1': ['published', 'draft', 'deleted'],
//     resourceName: '@cname', // 生成用户名 ， 都是中国人的名字
//     resourceUrl: '',
//     'httpMethod|1': ['get', 'post'],
//     resourceDesc: ''
//   }]
// })

module.exports = [
  {
    url: '/third/getSubFunctionList',
    type: 'get',
    response: (config) => {
      return {
        code: '00000',
        data: [
          {
            functionId: '1',
            functionName: '功能1',
            functionCode: 'code11',
            appName: '应用1',
            routerUrl: '/ceshi1',
            sort: 1,
            serviceName: '服务1',
            functionParentName: '管理员管理',
            functionParentId: '1673515914846195713',
            appId: 1,
            status: 2,
            appCode: 'ying2',
            children: [
              {
                functionId: '11',
                functionName: '功能11',
                functionCode: 'code111',
                appName: '应用111',
                routerUrl: '/ceshi11111',
                sort: 1,
                serviceName: '服务1',
                functionParentName: '管理员管理',
                functionParentId: '1673515914846195713',
                appId: 1,
                status: 2,
                appCode: 'ying2'
              }
            ]
          },
          {
            functionId: '2',
            functionName: '功能2',
            functionCode: 'code22',
            appName: '应用2',
            routerUrl: '/ceshi2',
            sort: 2,
            serviceName: '服务2',
            functionParentName: '接口权限配置',
            functionParentId: '1680835570155061249',
            thirdAppId: '2',
            status: 1,
            appCode: 'ying3'
          }
        ]
      }
    }
  },
  {
    url: '/third/getAppList',
    type: 'get',
    response: (config) => {
      return {
        code: '00000',
        data: [
          {
            id: '11',
            name: '类型1',
            appCode: null,
            children: [
              {
                id: '1e',
                name: '应用1',
                appCode: 'ying2'
              }
            ]
          },
          {
            id: '22',
            name: '类型2',
            appCode: null,
            children: [
              {
                id: '1e',
                name: '应用2',
                appCode: 'ying3'
              }
            ]
          }
        ]
      }
    }
  },
  {
    url: '/third/addFunction',
    type: 'post',
    response: (config) => {
      return {
        code: '00000',
        data: null,
        success: true,
        message: '成功'
      }
    }
  },
  {
    url: '/third/editFunction',
    type: 'post',
    response: (config) => {
      return {
        code: '00000',
        data: null,
        success: true,
        message: '成功'
      }
    }
  },
  {
    url: '/third/exportExcel',
    type: 'post',
    response: (config) => {
      return {
        code: '00000',
        data: null,
        success: true,
        message: '成功'
      }
    }
  },
  {
    url: '/third/updateStatus',
    type: 'post',
    response: (config) => {
      return {
        code: '00000',
        data: null,
        success: true,
        message: '成功'
      }
    }
  },
  {
    url: '/third/importFunction',
    type: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    response: (_) => {
      return {
        code: '00000',
        data: null,
        message: '请求成功',
        success: true
      }
    }
  },
  {
    url: '/third/getSubFunctionTree',
    type: 'get',
    response: (config) => {
      return {
        code: '00000',
        data: [
          {
            functionId: '-1',
            functionName: '根节点',
            children: [
              {
                functionId: '1',
                functionName: '父节点1'
              }
            ]
          }
        ],
        success: true,
        message: '成功'
      }
    }
  }
]
